<template>
  <div>
    <el-image style="width: 100px; height: 100px" :src="url" :fit="'scale-down'"></el-image>
  </div>
</template>
<script lang="ts" setup>
  import { ref, onMounted } from 'vue'
  import { UserService } from '@/api/usersApi'
  const url = ref('')
  onMounted(async () => {
    const res = await UserService.getUserData({ id: '1859425909392674816' })
    console.log(res)
    url.value = `http://localhost/img/${res.data.headUrl}.jpeg`
    console.log(url.value)
  })
</script>
